package top.chenfu.cloud.item.client.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Objects;

/**
 * @Auther chenfu
 * @2019/12/4 22:24
 * @Desc
 */
@RestController
public class HelloController {

    @Value(value = "${chenfu.msg:defaultMsg}")
    private String msg;

    @GetMapping(value = "hello")
    public String hello() {
        return "hello";
    }

    @GetMapping(value = "msg")
    public Object msg() {
        HashMap<String, Object> map = new HashMap<>();
        map.put("msg", msg);
        map.put("code", 200);
        return map;
    }

}
